package Eyjafjalla.relic;

import Eyjafjalla.action.PompeiiAction;
import Eyjafjalla.helper.StringHelper;
import Eyjafjalla.patch.PompeiiPatch;
import basemod.abstracts.CustomRelic;
import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.helpers.ImageMaster;
import com.megacrit.cardcrawl.relics.AbstractRelic;
import com.megacrit.cardcrawl.rooms.MonsterRoomBoss;

public class VolcanoBoom extends CustomRelic {

    public static final String ID = "eyjafjalla:VolcanoBoom";

    public VolcanoBoom(){
        super(ID, ImageMaster.loadImage(StringHelper.getRelicIMGPATH(ID,false)),ImageMaster.loadImage(StringHelper.getRelicIMGPATH(ID,true)),RelicTier.SPECIAL,LandingSound.SOLID);
        this.counter = 50;
    }

    @Override
    public void atTurnStart() {
        if(PompeiiPatch.facePompeii)
            return;
        if(!(AbstractDungeon.getCurrRoom() instanceof MonsterRoomBoss)){
            counter--;
            if(counter<=0){
                counter = -1;
                this.flash();
                addToBot(new RelicAboveCreatureAction(AbstractDungeon.player,this));
                addToBot(new PompeiiAction());
            }
        }
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0];
    }

    @Override
    public AbstractRelic makeCopy() {
        return new VolcanoBoom();
    }
}


